		var fyKinds = $.query.get("fyKinds");
		var fyGq = $.query.get("fyGq");
		//标题
		$("#title").html(fyKinds+'-'+fyGq);
		//加载数据
		$(function() {
			
			$(".search-input").change(function(){
				serch();
			});
			
			
			
			$(".select-hidden").change(function(){
				serch();
			});
			
			MTools.autoFullSelect();
			//表单信息
			$("#fyKinds").val(fyKinds);
			$("#fyGq").val(fyGq);
		//buidGq();
			var pageSize = $("#limit").val();
			Pagination
					.init({
						url : basePath+"/index/queryFy",
						pageSize : pageSize,
						builderDate : function(loj) {
							var html = "";
							if (loj.getRowCount() <= 0) {
								$("#addhas").hide();
								$("#addno").show();
								return;
							} else {
								$("#addhas").show();
								$("#addno").hide();
							}
							var price="";
							var top="";
							for (var i = 0; i < loj.getRowCount(); i++) {
								if(loj.getString(i,"csPrice").length>0){
									price=loj.getString(i,"csPrice")+"万";
								}else{
									price=loj.getString(i,"czPrice")+"元/月";
								}
								
								if(loj.getString(i,"glIsTop")=='是'){
									top='<img src="'+basePath+'/resource/images/d.png" />';
								}
								
								var strs=loj.getString(i,"qzqgTs").split(" ");
								var flag="";
								for(var j=0;j<strs.length;j++){
									flag+='<span class="am-badge am-badge-warning">'+strs[j]+'</span> ';
								}
								
								html+='<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
									'<div class="am-u-sm-4 am-list-thumb">'+
								'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
							'</div>'+
							'<div class=" am-u-sm-8 am-list-main">'+
								'<h3 class="am-list-item-hd">'+
							'		<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
								'</h3>'+
							'	<div style="font-size: 1.5rem;"  class="am-list-item-text color-9">'+
							'		'+loj.getString(i,"infoAreaCount")+"㎡ */*层 "+loj.getString(i,"infoZxqk")+
							'		<span class="color-y font-w6 font-s1  price">'+price+
							'	</span>'+
							'	</div>'+
							'	<div class="am-list-item-text color-9">'+flag+'</div>'+
							'</div>'+
						'</li>'
							}
	//========================================================================================================================						
							
						/*
						 * +loj.getString(i,"infoLcIndex")+"/"+loj.getString(i,"infoLcCount")+"层 "+
						 * loj.getString(i,"infoLcIndex")	if (fyKinds == '出租房'&&fyGq=='出租') {
								html=buidczfcz(loj);	
							}else if(fyKinds == '出租房'&&fyGq=='求租'){
								html=buidczfqz(loj);	
							}else if(fyKinds == '二手房'&&fyGq=='出售'){
								html=buidesfcs(loj);	
							}else if(fyKinds == '二手房'&&fyGq=='求购'){
								html=buidesfqg(loj);	
							}else if(
									(fyKinds == '写字楼'&&fyGq=='转让')||
									(fyKinds == '写字楼'&&fyGq=='出售')||
									(fyKinds == '写字楼'&&fyGq=='出租')||
									
									(fyKinds == '商铺'&&fyGq=='转让')||
									(fyKinds == '商铺'&&fyGq=='出售')||
									(fyKinds == '商铺'&&fyGq=='出租')){
								html=buidespzr(loj);	
							}else if(
									(fyKinds == '写字楼'&&fyGq=='求购')||
									(fyKinds == '写字楼'&&fyGq=='求租')||
									
									(fyKinds == '商铺'&&fyGq=='求购')||
									(fyKinds == '商铺'&&fyGq=='求租')){
								html=buidespqg(loj);	
							}
							
							
							
							else if(
									(fyKinds == '厂房'&&fyGq=='转让')||
									(fyKinds == '厂房'&&fyGq=='出售')||
									(fyKinds == '厂房'&&fyGq=='出租')){
								html=buidecfzr(loj);	
							}else if(
									(fyKinds == '厂房'&&fyGq=='求购')||
									(fyKinds == '厂房'&&fyGq=='求租')){
								html=buidecfqg(loj);	
							}
							
							*/
															
							$("#data").append(html);
						}
					});
			addData();
		})
		
		
		var pageNow = 1;
		function addData() {
			Pagination.changePage(pageNow);
			pageNow++;
		}
		
		function serch(){
			
			$("#data").html("");
			 pageNow = 1;
			Pagination.changePage(pageNow);
		}
		
		
		
		//构建菜单

function buidGq(){
	console.log(12);
	var html = '';
	var colum=0;
	if (fyKinds == '二手房') {
		html=gethref('二手房','出售')+gethref('二手房','求购');
		colum=2;
	} else if (fyKinds == '写字楼') {
		html=gethref('写字楼','出售')+gethref('写字楼','出租')+gethref('写字楼','求购')+gethref('写字楼','求租');
		colum=4;
	} else if (fyKinds == '出租房') {
		html=gethref('出租房','出租')+gethref('出租房','求租');
		colum=2;
	} else if (fyKinds == '商铺') {
		html=gethref('商铺','出售')+gethref('商铺','出租')+gethref('商铺','转让')+gethref('商铺','求购')+gethref('商铺','求租');
		colum=5;
	} else if (fyKinds == '厂房') {
		html=gethref('厂房','出售')+gethref('厂房','出租')+gethref('厂房','转让')+gethref('厂房','求购')+gethref('厂房','求租');
		colum=5;
	}
	$("#gq").html(html);
	$("#gq").attr("class","title-ul padding-b0 am-avg-sm-"+colum);
	
}
function gethref(kinds,gq){
	return '<li class="text-center font-s2"><a href="'+basePath+'/visitor/redirect/house-list?fyKinds='+kinds+'&fyGq='+gq+'" class="color-3">'+gq+'</a></li>';
}
		

		
		
//出租房出租信息
function  buidczfcz(loj){
	var html = "";
	for (var i = 0; i < loj.getRowCount(); i++) {
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class="am-u-sm-4 am-list-thumb">'+
			'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
		'</div>'+
		'<div class=" am-u-sm-8 am-list-main">'+
			'<h3 class="am-list-item-hd">'+
			'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
			'</h3>'+
			'<div class="am-list-item-text color-9">'
			+'<span class="house-span">'
			+loj.getString(i,"infoRoomS")+'室'+
			+loj.getString(i,"infoRoomT")+'厅'+
			+loj.getString(i,"infoRoomW")+'卫-'
			+loj.getString(i,"infoNeighbourhoodsName")
			+' /'+loj.getDateSimple(i,"glCreateTime")
			+'</span>'
			+
			'</div>'+		
		'	<div class="">'+
		'<span class="color-y font-w6 font-s1 ">'+
				loj.getString(i,"czPrice")+
				loj.getString(i,"czPriceMethod")+
		'</span>'+
		'		<span class="time color-9 float-r">'+loj.getString(i,"infoZxqk")+'</span>'+
		'	</div>'+
		'	</div>'+
		'	</li>';
	}
	return html;
}		


//二手房出售
function  buidesfcs(loj){
	var html = "";
	for (var i = 0; i < loj.getRowCount(); i++) {
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class="am-u-sm-4 am-list-thumb">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
		'</div>'+
		'<div class=" am-u-sm-8 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"infoRoomS")+'室'+
		+loj.getString(i,"infoRoomT")+'厅'+
		+loj.getString(i,"infoRoomW")+'卫-'
		+loj.getString(i,"infoNeighbourhoodsName")
		+' /'+loj.getDateSimple(i,"glCreateTime")
		+
		'</div>'+
		'<div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		+loj.getString(i,"csPrice")
		+'万</div>'+
		'	<div class="float-l">'+
		
		'		<span class="time color-9">'+loj.getString(i,"infoZxqk")+'</span>'+
		'	</div>'+
		'	</div>'+
		'	</li>';
	}
	return html;
}		


//出租房求租信息
function  buidczfqz(loj){
	var html = "";
	for (var i = 0; i < loj.getRowCount(); i++) {
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class=" am-u-sm-12 am-list-main">'+
			'<h3 class="am-list-item-hd">'+
			'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
			'</h3>'+
			'<div class="am-list-item-text color-9">'
			+loj.getString(i,"qzqgArea")
			+' /'+loj.getDateSimple(i,"glCreateTime")
			+'</div><div class="float-r">'+
				'<span class="color-y font-w6 font-s1">'
				+loj.getString(i,"qzqgPriceMin")+'-'
				+loj.getString(i,"qzqgPriceMax")
			+'/月</div>'+
			'</div>'+
		'	<div class="float-r">'+
		'		<span class="time color-9">'+loj.getString(i,"infoZxqk")+'</span>'+
		'	</div>'+
		'	</div>'+
		'	</li>';
	}
	return html;
}		




//二手房求购
function  buidesfqg(loj){
	var html = "";
	for (var i = 0; i < loj.getRowCount(); i++) {
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class=" am-u-sm-12 am-list-main">'+
			'<h3 class="am-list-item-hd">'+
			'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
			'</h3>'+
			'<div class="am-list-item-text color-9">'
			+loj.getString(i,"qzqgArea")
			+' /'+loj.getDateSimple(i,"glCreateTime")
			+'</div><div class="float-r">'+
				'<span class="color-y font-w6 font-s1">'
				+loj.getString(i,"qzqgPriceMin")+'万-'
				+loj.getString(i,"qzqgPriceMax")
			+'万</div>'+
			'</div>'+
		'	<div class="float-r">'+
		'		<span class="time color-9">'+loj.getString(i,"infoZxqk")+'</span>'+
		'	</div>'+
		'	</div>'+
		'	</li>';
	}
	return html;
}		











//商铺转让  出售
function  buidespzr(loj){
	var html = "";
	for (var i = 0; i < loj.getRowCount(); i++) {
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		
		
		var price="";
		if(fyGq!='出租'){
			price=loj.getString(i,"csPrice")+"万";
		}else{
			price=loj.getString(i,"czPrice")+"/月";
		}
			
		
		
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class="am-u-sm-4 am-list-thumb">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
		'</div>'+
		'<div class=" am-u-sm-8 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"spType")
		+loj.getString(i,"infoAreaCount")+' ㎡ '
		+loj.getString(i,"qzqgArea")
		+'  /'+loj.getDateSimple(i,"glCreateTime")
		+'<div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		
		+price+'</div>'+
		'</div>'+
		'	</div>'+
		'	</li>';
	}
	return html;
}		






		


//商铺求购求租
function  buidespqg(loj){
	var html = "";
	for (var i = 0; i < loj.getRowCount(); i++) {
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		
		var price="";
		if(fyGq!='求租'){
			price=+loj.getString(i,"qzqgPriceMin")+'万 - '
			+loj.getString(i,"qzqgPriceMax")+'万';
		}else{
			price=+loj.getString(i,"qzqgPriceMin")+'-'
			+loj.getString(i,"qzqgPriceMax")+'/月';
		}
		
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class=" am-u-sm-12 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"qzqgArea")
		+' /'+loj.getDateSimple(i,"glCreateTime")
		+'</div><div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		+price+'</div>'+
		'</div>'+
		'	</div>'+
		'	</li>';
	}
	return html;
}		


















//厂房转让  出售
function  buidecfzr(loj){
	var html = "";
	for (var i = 0; i < loj.getRowCount(); i++) {
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		
		
		var price="";
		if(fyGq!='出租'){
			price=loj.getString(i,"csPrice")+"万";
		}else{
			price=loj.getString(i,"czPrice")+"/月";
		}
			
		
		
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class="am-u-sm-4 am-list-thumb">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
		'</div>'+
		'<div class=" am-u-sm-8 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"spType")
		+loj.getString(i,"infoAreaCount")+' ㎡ '
		+loj.getString(i,"qzqgArea")
		+'  /'+loj.getDateSimple(i,"glCreateTime")
		+'<div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		
		+price+'</div>'+
		'</div>'+
		'	</div>'+
		'	</li>';
	}
	return html;
}		






		


//厂房求购求租
function  buidecfqg(loj){
	var html = "";
	for (var i = 0; i < loj.getRowCount(); i++) {
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		
		var price="";
		if(fyGq!='求租'){
			price=+loj.getString(i,"qzqgPriceMin")+'万 - '
			+loj.getString(i,"qzqgPriceMax")+'万';
		}else{
			price=+loj.getString(i,"qzqgPriceMin")+'-'
			+loj.getString(i,"qzqgPriceMax")+'/月';
		}
		
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class=" am-u-sm-12 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"qzqgArea")
		+' /'+loj.getDateSimple(i,"glCreateTime")
		+'</div><div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		+price+'</div>'+
		'</div>'+
		'	</div>'+
		'	</li>';
	}
	return html;
}		

